package com.ghsc.ghxc.jsb.ui.my.activity

import android.os.Bundle
import android.view.View
import com.cn.appcore.base.BaseVMActivity
import com.cn.appcore.ext.setSingleClickListener
import com.cn.appcore.utils.ApkUtil
import com.ghsc.ghxc.jsb.R
import com.ghsc.ghxc.jsb.databinding.ActivityAboutUsBinding
import com.ghsc.ghxc.jsb.ui.login.AgreementActivity

/**
 * 项目：GuoHuaJsb
 * 包名：com.ghsc.ghxc.jsb.ui.my.activity
 * 类名：AboutUsActivity
 * 创建时间：2024/4/25 17:56
 * 创建人 @author： xiaolin
 * 描述 ：Todo...关于我们
 */
class AboutUsActivity : BaseVMActivity<SetUpViewModel, ActivityAboutUsBinding>(){
    override fun attachLayoutRes(): Int {
        return R.layout.activity_about_us
    }

    override fun attachVMClass(): Class<SetUpViewModel>? {
        return  SetUpViewModel::class.java
    }

    override fun initBar() {
        super.initBar()
        mImmersionBar!!.statusBarDarkFont(true).init()
    }
    override fun initView() {
        binding.run {
            bar.topTitle.text="关于我们"
            bar.topRightView.visibility= View.GONE
            bar.topLeftView.setSingleClickListener { finish() }

        }
        var name = ApkUtil.getVersionName()
        binding.tvVersion.text="版本号：V${name}"


    }


    override fun initClickListener() {
        super.initClickListener()
        binding.run {
            llBtnAgreement.setSingleClickListener {
                //用户服务协议
                var bundle = Bundle()
                bundle.putInt("sign",1)
                startActivity(AgreementActivity().javaClass,bundle)

            }
            llBtnPolicy.setSingleClickListener {
                //隐私政策
                var bundle = Bundle()
                bundle.putInt("sign",2)
                startActivity(AgreementActivity().javaClass,bundle)
            }
        }
    }
}